package com.bruce.imovie.adapter.pager;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import com.bruce.imovie.base.BaseFragmentAdapter;
import com.bruce.imovie.fragment.VideoListFragment;
import com.bruce.imovie.retrofit.service.MmyyService;

/**
 *
 * Created by fanchen on 2017/9/24.
 */
public class MmyyPagerAdapter extends BaseFragmentAdapter {

    private final String[] TITLES = new String[]{"首页","电视剧", "电影", "动漫","综艺","伦理"};
    private final String[] PATHS = new String[]{"","dianshiju", "dianying", "dongman","zongyi","lunli"};
    private final Boolean[] LOADS = new Boolean[]{false,true,true,true,true,true,true};
    private final Boolean[] BANGUMI = new Boolean[]{true,false,false,false,false,false,false};

    public MmyyPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public String[] getTitles() {
        return TITLES;
    }

    @Override
    public Fragment createFragment(int position) {
        return VideoListFragment.newInstance(PATHS[position],getExtendInfo().toString(),1,2,LOADS[position],false,false,null,BANGUMI[position]);
    }

    @Override
    public Object getExtendInfo() {
        return MmyyService.class.getName();
    }
}
